package com.shajj.movie.fetch;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.simpleds.bg.TaskRequest;

import com.google.appengine.api.taskqueue.QueueFactory;
import com.google.appengine.api.taskqueue.TaskOptions;

public class DataTaskServlet extends HttpServlet {

	private static final long serialVersionUID = 2868525951773137578L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		TaskOptions to = TaskOptions.Builder.withUrl("/tasks").param(TaskRequest.TASK_PARAM, "shajj");
		QueueFactory.getDefaultQueue().add(to);
		resp.getWriter().write("Success");
	}

}
